"""
URL configuration for tracer project.

The `urlpatterns` list routes URLs to views. For more information please see:
    https://docs.djangoproject.com/en/4.2/topics/http/urls/
Examples:
Function views
    1. Add an import:  from my_app import views
    2. Add a URL to urlpatterns:  path('', views.home, name='home')
Class-based views
    1. Add an import:  from other_app.views import Home
    2. Add a URL to urlpatterns:  path('', Home.as_view(), name='home')
Including another URLconf
    1. Import the include() function: from django.urls import include, path
    2. Add a URL to urlpatterns:  path('blog/', include('blog.urls'))
"""

from django.urls import path,re_path,include

urlpatterns = [
    # path('admin/', admin.site.urls),
    # path('index/', views.index),
    # path('send/sms/', views.send_sms),
    # path('register/', views.register),

## 设置一下路由分发，利用正则表达式当访问的开头是tracer_01时，会自动跳转到应用tracer_01的urls.py中。其它的将会跳转到应用web的urls中
    re_path(r'^tracer_01/',include(("tracer_01.urls",'tracer_01'))), # 第一个参数是要跳转的url，第二个参数是反向解析用到的命名空间。
                        # 一旦使用了命名空间，在使用反向解析时就用这种形式来解析，即主路由的命名空间+分路由的命名空间：tracer_01：register
    re_path(r'^web/',include("web.urls")),

    re_path(r'^web1/', include("web1.urls")),
]

























